package website.haicheng.cloudauth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import website.haicheng.core.base.BaseQueryEntity;
import website.haicheng.core.validated.groups.InsertGroup;
import website.haicheng.core.validated.groups.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @description:
 * @author: 582895699@qq.com
 * @time: 2021/2/19 下午 08:53
 */
@Getter
@Setter
@ApiModel(description = "添加、修改角色实体类")
public class RoleInfoDto extends BaseQueryEntity {
    private static final long serialVersionUID = 4265354647665990560L;

    @NotNull(message = "id不可为空", groups = {UpdateGroup.class})
    @ApiModelProperty(value = "id")
    private Long id;

    @NotNull(message = "角色名称不可为空", groups = {InsertGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @NotBlank(message = "角色描述不可为空", groups = {InsertGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "描述")
    private String description;

    @NotNull(message = "排序不可为空", groups = {InsertGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @NotNull(message = "角色状态不可为空", groups = {InsertGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "状态")
    private Integer isDelete;

    @NotNull(message = "权限id不可为空", groups = {InsertGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "权限id")
    private List<Long> permissionIds;
}
